 |
 |
 |
 |
#262239 - 12/12/03 01:56 AM
Re: Beta-[6.4] Online Users 2.0
[Re: groov_richmond]
|
Addict
Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
|
Actually that is not necessary, the reason it didn't work properly is because the info about which board they are visiting has been changed in 6.4 which wasn't taken into consideration when the mod was updated. Try this:<br /><br /> #<br /># Find this:<br />#<br /><br />// Find out how many are browsing this forum<br /> $query = "<br /> SELECT O_Type,O_Board,COUNT(*)<br /> FROM {$config['tbprefix']}Online<br /> WHERE O_Board = '$Board'<br /> GROUP BY O_Type<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> $a = "0";<br /> $r = "0";<br /> while (list($Type,$Extra,$onlinecount) = $dbh -> fetch_array($sth)) {<br /> ${$Type} = $onlinecount;<br /> }<br /><br />#<br /># Change to:<br />#<br /><br />// Start of Online Users hack.<br />// Find out how many are browsing this forum and check who are online.<br /> $Outdated = $html -> get_date() - 600;<br /> $queryOnline = "<br /> SELECT O_Uid,O_Type,O_Board<br /> FROM {$config['tbprefix']}Online<br /> WHERE O_Last > $Outdated<br /> ORDER BY O_Last DESC<br /> ";<br /> $sth = $dbh -> do_query($queryOnline);<br /> $a = 0;<br /> $r = 0;<br /> $OnlineUsers = Array();<br /> while (list($ol_usernum,$Type,$VisitingBoard) = $dbh -> fetch_array($sth)) {<br /> // Check if the user is browsing this board and update the counters accordingly<br /> if ( $VisitingBoard == $Board ) {<br /> ${$Type}++;<br /> }<br /> // Add this user to the list of online users if they are logged in.<br /> if ( $ol_usernum ) {<br /> $OnlineUsers[] = $ol_usernum;<br /> }<br /> }<br />// End of Online Users hack.<br /><br />Now, I haven't tried this, but I think it should work. =]
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|